/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * InterfazAdministrador.java
 *
 * Created on 20/09/2012, 10:48:31 AM
 */
package view;


//import hpva.HPVA;


/**
 *
 * @author Lin
 */
public class InterfazEmpleado extends javax.swing.JFrame {


    /**
     * Creates new form InterfazAdministrador
     */
    public InterfazEmpleado() {
        initComponents();
        //setLocation(HPVA.centrarVentana(getPreferredSize()));
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        grupoBotonesCargo = new javax.swing.ButtonGroup();
        campoTextoNumeroDocumento = new javax.swing.JTextField();
        campoTextoNombre = new javax.swing.JTextField();
        campoTextoFechaNacimiento = new javax.swing.JTextField();
        campoTextoLugarNacimiento = new javax.swing.JTextField();
        campoTextoEnfoque = new javax.swing.JTextField();
        campoTextoEspecialidad = new javax.swing.JTextField();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        panelSeleccionarPersonas = new javax.swing.JPanel();
        etiquetaTipo = new javax.swing.JLabel();
        botonRadialVeterinario = new javax.swing.JRadioButton();
        botonRadialDuenio = new javax.swing.JRadioButton();
        labelSSN = new javax.swing.JLabel();
        comboBoxSSN = new javax.swing.JComboBox();
        panelDatos = new javax.swing.JPanel();
        etiquetaNumeroDocumento = new javax.swing.JLabel();
        etiquetaNombre = new javax.swing.JLabel();
        etiquetaFechaNacimiento = new javax.swing.JLabel();
        etiquetaLugarNacimiento = new javax.swing.JLabel();
        etiquetaEnfoque = new javax.swing.JLabel();
        etiquetaEspecialidad = new javax.swing.JLabel();
        etiquetaSalario = new javax.swing.JLabel();
        etiquetaGraduadoEn = new javax.swing.JLabel();
        capaDocumento = new javax.swing.JLayer();
        capaNombre = new javax.swing.JLayer();
        capaFechaNacimiento = new javax.swing.JLayer();
        capaLugarNacimiento = new javax.swing.JLayer();
        capaEnfoque = new javax.swing.JLayer();
        capaEspecialidad = new javax.swing.JLayer();
        capaSalario = new javax.swing.JTextField();
        capaGraduadoEn = new javax.swing.JTextField();
        panelOperaciones = new javax.swing.JPanel();
        botonCrear = new javax.swing.JButton();
        botonModificar = new javax.swing.JButton();
        botonBorrar = new javax.swing.JButton();
        botonSalir = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();

        campoTextoNumeroDocumento.setFont(new java.awt.Font("Ubuntu Light", 0, 12)); // NOI18N
        campoTextoNumeroDocumento.setMaximumSize(new java.awt.Dimension(112, 20));
        campoTextoNumeroDocumento.setMinimumSize(new java.awt.Dimension(112, 20));
        campoTextoNumeroDocumento.setName("campoTextoNumeroDocumento"); // NOI18N
        campoTextoNumeroDocumento.setPreferredSize(new java.awt.Dimension(112, 20));
        campoTextoNumeroDocumento.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                campoTextoNumeroDocumentoKeyReleased(evt);
            }
        });

        campoTextoNombre.setFont(new java.awt.Font("Ubuntu Light", 0, 12)); // NOI18N
        campoTextoNombre.setMaximumSize(new java.awt.Dimension(9, 20));
        campoTextoNombre.setMinimumSize(new java.awt.Dimension(9, 20));
        campoTextoNombre.setName("campoTextoNombre"); // NOI18N
        campoTextoNombre.setPreferredSize(new java.awt.Dimension(112, 20));
        campoTextoNombre.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                campoTextoNombreKeyReleased(evt);
            }
        });

        campoTextoFechaNacimiento.setFont(new java.awt.Font("Ubuntu Light", 0, 12)); // NOI18N
        campoTextoFechaNacimiento.setMaximumSize(new java.awt.Dimension(112, 20));
        campoTextoFechaNacimiento.setMinimumSize(new java.awt.Dimension(112, 20));
        campoTextoFechaNacimiento.setName("campoTextoFechaNacimiento"); // NOI18N
        campoTextoFechaNacimiento.setPreferredSize(new java.awt.Dimension(112, 20));
        campoTextoFechaNacimiento.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                campoTextoFechaNacimientoKeyReleased(evt);
            }
        });

        campoTextoLugarNacimiento.setFont(new java.awt.Font("Ubuntu Light", 0, 12)); // NOI18N
        campoTextoLugarNacimiento.setMaximumSize(new java.awt.Dimension(112, 20));
        campoTextoLugarNacimiento.setMinimumSize(new java.awt.Dimension(112, 20));
        campoTextoLugarNacimiento.setName("campoTextoLugarNacimiento"); // NOI18N
        campoTextoLugarNacimiento.setPreferredSize(new java.awt.Dimension(112, 20));
        campoTextoLugarNacimiento.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                campoTextoLugarNacimientoKeyReleased(evt);
            }
        });

        campoTextoEnfoque.setFont(new java.awt.Font("Ubuntu Light", 0, 12)); // NOI18N
        campoTextoEnfoque.setMaximumSize(new java.awt.Dimension(112, 20));
        campoTextoEnfoque.setMinimumSize(new java.awt.Dimension(112, 20));
        campoTextoEnfoque.setName("campoTextoEnfoque"); // NOI18N
        campoTextoEnfoque.setPreferredSize(new java.awt.Dimension(112, 20));
        campoTextoEnfoque.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                campoTextoEnfoqueKeyReleased(evt);
            }
        });

        campoTextoEspecialidad.setFont(new java.awt.Font("Ubuntu Light", 0, 12)); // NOI18N
        campoTextoEspecialidad.setMaximumSize(new java.awt.Dimension(112, 20));
        campoTextoEspecialidad.setMinimumSize(new java.awt.Dimension(112, 20));
        campoTextoEspecialidad.setName("campoTextoEspecialidad"); // NOI18N
        campoTextoEspecialidad.setPreferredSize(new java.awt.Dimension(112, 20));
        campoTextoEspecialidad.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                campoTextoEspecialidadKeyReleased(evt);
            }
        });

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Administrador");
        setResizable(false);

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N

        panelSeleccionarPersonas.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Selección", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Ubuntu Light", 0, 14))); // NOI18N
        panelSeleccionarPersonas.setName("panelSeleccionarPersonas"); // NOI18N

        etiquetaTipo.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        etiquetaTipo.setText("Tipo:");
        etiquetaTipo.setName("etiquetaTipo"); // NOI18N

        grupoBotonesCargo.add(botonRadialVeterinario);
        botonRadialVeterinario.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        botonRadialVeterinario.setText("Veterinario");
        botonRadialVeterinario.setName("botonRadialVeterinario"); // NOI18N
        botonRadialVeterinario.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                botonRadialVeterinarioItemStateChanged(evt);
            }
        });
        botonRadialVeterinario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonRadialVeterinarioActionPerformed(evt);
            }
        });

        grupoBotonesCargo.add(botonRadialDuenio);
        botonRadialDuenio.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        botonRadialDuenio.setText("Dueño");
        botonRadialDuenio.setName("botonRadialDuenio"); // NOI18N
        botonRadialDuenio.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                botonRadialDuenioStateChanged(evt);
            }
        });
        botonRadialDuenio.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                botonRadialDuenioItemStateChanged(evt);
            }
        });

        labelSSN.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        labelSSN.setText("No. Documento:");
        labelSSN.setName("labelSSN"); // NOI18N

        comboBoxSSN.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        comboBoxSSN.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "" }));
        comboBoxSSN.setName("comboBoxSSN"); // NOI18N
        comboBoxSSN.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                comboBoxSSNItemStateChanged(evt);
            }
        });

        panelDatos.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Datos", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Ubuntu Light", 0, 14))); // NOI18N
        panelDatos.setName("panelDatos"); // NOI18N

        etiquetaNumeroDocumento.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        etiquetaNumeroDocumento.setText("No. Documento: ");
        etiquetaNumeroDocumento.setMaximumSize(new java.awt.Dimension(76, 14));
        etiquetaNumeroDocumento.setMinimumSize(new java.awt.Dimension(76, 14));
        etiquetaNumeroDocumento.setName("etiquetaNumeroDocumento"); // NOI18N

        etiquetaNombre.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        etiquetaNombre.setText("Nombre: ");
        etiquetaNombre.setMaximumSize(new java.awt.Dimension(76, 14));
        etiquetaNombre.setMinimumSize(new java.awt.Dimension(76, 14));
        etiquetaNombre.setName("etiquetaNombre"); // NOI18N
        etiquetaNombre.setPreferredSize(new java.awt.Dimension(76, 14));
        etiquetaNombre.setRequestFocusEnabled(false);

        etiquetaFechaNacimiento.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        etiquetaFechaNacimiento.setText("Fecha Nacimiento");
        etiquetaFechaNacimiento.setName("etiquetaFechaNacimiento"); // NOI18N

        etiquetaLugarNacimiento.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        etiquetaLugarNacimiento.setText("Lugar Nacimiento");
        etiquetaLugarNacimiento.setMaximumSize(new java.awt.Dimension(76, 14));
        etiquetaLugarNacimiento.setMinimumSize(new java.awt.Dimension(76, 14));
        etiquetaLugarNacimiento.setName("etiquetaLugarNacimiento"); // NOI18N

        etiquetaEnfoque.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        etiquetaEnfoque.setText("Enfoque:");
        etiquetaEnfoque.setMaximumSize(new java.awt.Dimension(76, 14));
        etiquetaEnfoque.setMinimumSize(new java.awt.Dimension(76, 14));
        etiquetaEnfoque.setName("etiquetaEnfoque"); // NOI18N

        etiquetaEspecialidad.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        etiquetaEspecialidad.setText("Especialidad:");
        etiquetaEspecialidad.setMaximumSize(new java.awt.Dimension(76, 14));
        etiquetaEspecialidad.setMinimumSize(new java.awt.Dimension(76, 14));
        etiquetaEspecialidad.setName("etiquetaEspecialidad"); // NOI18N

        etiquetaSalario.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        etiquetaSalario.setText("Salario:");
        etiquetaSalario.setMaximumSize(new java.awt.Dimension(76, 14));
        etiquetaSalario.setMinimumSize(new java.awt.Dimension(76, 14));
        etiquetaSalario.setName("etiquetaSalario"); // NOI18N

        etiquetaGraduadoEn.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        etiquetaGraduadoEn.setText("Graduado en:");
        etiquetaGraduadoEn.setMaximumSize(new java.awt.Dimension(76, 14));
        etiquetaGraduadoEn.setMinimumSize(new java.awt.Dimension(76, 14));
        etiquetaGraduadoEn.setName("etiquetaGraduadoEn"); // NOI18N

        capaDocumento.setName("capaDocumento"); // NOI18N
        capaDocumento.setView(campoTextoNumeroDocumento);

        capaNombre.setName("capaNombre"); // NOI18N
        capaNombre.setView(campoTextoNombre);

        capaFechaNacimiento.setName("capaFechaNacimiento"); // NOI18N
        capaFechaNacimiento.setView(campoTextoFechaNacimiento);

        capaLugarNacimiento.setName("capaLugarNacimiento"); // NOI18N
        capaLugarNacimiento.setView(campoTextoLugarNacimiento);

        capaEnfoque.setName("capaEnfoque"); // NOI18N
        capaEnfoque.setView(campoTextoEnfoque);

        capaEspecialidad.setName("capaEspecialidad"); // NOI18N
        capaEspecialidad.setView(campoTextoEspecialidad);

        capaSalario.setName("capaSalario"); // NOI18N

        capaGraduadoEn.setName("capaGraduadoEn"); // NOI18N

        javax.swing.GroupLayout panelDatosLayout = new javax.swing.GroupLayout(panelDatos);
        panelDatos.setLayout(panelDatosLayout);
        panelDatosLayout.setHorizontalGroup(
            panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelDatosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelDatosLayout.createSequentialGroup()
                        .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(etiquetaEspecialidad, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE)
                            .addComponent(etiquetaEnfoque, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE))
                        .addGap(74, 74, 74))
                    .addGroup(panelDatosLayout.createSequentialGroup()
                        .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(etiquetaSalario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(etiquetaGraduadoEn, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(etiquetaNumeroDocumento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(etiquetaNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(etiquetaLugarNacimiento, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(etiquetaFechaNacimiento, javax.swing.GroupLayout.Alignment.LEADING)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 63, Short.MAX_VALUE)))
                .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(capaLugarNacimiento, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
                    .addComponent(capaFechaNacimiento, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(capaDocumento, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(capaEnfoque, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(capaNombre, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(capaEspecialidad, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(capaSalario)
                    .addComponent(capaGraduadoEn))
                .addGap(12, 12, 12))
        );
        panelDatosLayout.setVerticalGroup(
            panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelDatosLayout.createSequentialGroup()
                .addGap(17, 17, 17)
                .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(capaDocumento, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(etiquetaNumeroDocumento, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(capaNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(etiquetaNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(capaFechaNacimiento, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(etiquetaFechaNacimiento, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(8, 8, 8)
                .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(capaLugarNacimiento, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(etiquetaLugarNacimiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(8, 8, 8)
                .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(capaEnfoque, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(etiquetaEnfoque, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(8, 8, 8)
                .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelDatosLayout.createSequentialGroup()
                        .addComponent(etiquetaEspecialidad, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(etiquetaSalario, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(capaSalario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(panelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(etiquetaGraduadoEn, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(capaGraduadoEn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(capaEspecialidad, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        panelOperaciones.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Operación", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Ubuntu Light", 0, 14))); // NOI18N
        panelOperaciones.setName("panelOperaciones"); // NOI18N

        botonCrear.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        botonCrear.setText("Crear");
        botonCrear.setEnabled(false);
        botonCrear.setMaximumSize(new java.awt.Dimension(91, 25));
        botonCrear.setMinimumSize(new java.awt.Dimension(91, 25));
        botonCrear.setName("botonCrear"); // NOI18N
        botonCrear.setPreferredSize(new java.awt.Dimension(91, 25));
        botonCrear.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                botonCrearMouseClicked(evt);
            }
        });

        botonModificar.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        botonModificar.setText("Modificar");
        botonModificar.setEnabled(false);
        botonModificar.setName("botonModificar"); // NOI18N
        botonModificar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                botonModificarMouseClicked(evt);
            }
        });

        botonBorrar.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        botonBorrar.setText("Borrar");
        botonBorrar.setEnabled(false);
        botonBorrar.setMaximumSize(new java.awt.Dimension(91, 25));
        botonBorrar.setMinimumSize(new java.awt.Dimension(91, 25));
        botonBorrar.setName("botonBorrar"); // NOI18N
        botonBorrar.setPreferredSize(new java.awt.Dimension(91, 25));
        botonBorrar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                botonBorrarMouseClicked(evt);
            }
        });

        botonSalir.setFont(new java.awt.Font("Ubuntu Light", 0, 14)); // NOI18N
        botonSalir.setText("Salir");
        botonSalir.setMaximumSize(new java.awt.Dimension(91, 25));
        botonSalir.setMinimumSize(new java.awt.Dimension(91, 25));
        botonSalir.setName("botonSalir"); // NOI18N
        botonSalir.setPreferredSize(new java.awt.Dimension(91, 25));
        botonSalir.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                botonSalirMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout panelOperacionesLayout = new javax.swing.GroupLayout(panelOperaciones);
        panelOperaciones.setLayout(panelOperacionesLayout);
        panelOperacionesLayout.setHorizontalGroup(
            panelOperacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelOperacionesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelOperacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(botonBorrar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(botonCrear, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(botonModificar))
                .addGap(92, 92, 92))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelOperacionesLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(botonSalir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        panelOperacionesLayout.setVerticalGroup(
            panelOperacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelOperacionesLayout.createSequentialGroup()
                .addGap(48, 48, 48)
                .addComponent(botonCrear, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(28, 28, 28)
                .addComponent(botonModificar)
                .addGap(30, 30, 30)
                .addComponent(botonBorrar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(30, 30, 30)
                .addComponent(botonSalir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(20, 20, 20))
        );

        javax.swing.GroupLayout panelSeleccionarPersonasLayout = new javax.swing.GroupLayout(panelSeleccionarPersonas);
        panelSeleccionarPersonas.setLayout(panelSeleccionarPersonasLayout);
        panelSeleccionarPersonasLayout.setHorizontalGroup(
            panelSeleccionarPersonasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelSeleccionarPersonasLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelSeleccionarPersonasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelSeleccionarPersonasLayout.createSequentialGroup()
                        .addComponent(etiquetaTipo)
                        .addGap(22, 22, 22)
                        .addGroup(panelSeleccionarPersonasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(botonRadialDuenio, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(botonRadialVeterinario, javax.swing.GroupLayout.Alignment.LEADING))
                        .addGap(64, 64, 64)
                        .addComponent(labelSSN))
                    .addComponent(panelDatos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(panelSeleccionarPersonasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelSeleccionarPersonasLayout.createSequentialGroup()
                        .addGap(124, 124, 124)
                        .addComponent(comboBoxSSN, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(panelSeleccionarPersonasLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(panelOperaciones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panelSeleccionarPersonasLayout.setVerticalGroup(
            panelSeleccionarPersonasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelSeleccionarPersonasLayout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addGroup(panelSeleccionarPersonasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(etiquetaTipo)
                    .addComponent(labelSSN)
                    .addComponent(comboBoxSSN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(botonRadialVeterinario))
                .addGap(2, 2, 2)
                .addComponent(botonRadialDuenio)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelSeleccionarPersonasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(panelOperaciones, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(panelSeleccionarPersonasLayout.createSequentialGroup()
                        .addComponent(panelDatos, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))))
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(panelSeleccionarPersonas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 17, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(panelSeleccionarPersonas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 75, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Personas", jPanel1);

        jPanel2.setName("jPanel2"); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 637, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 507, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("Mascotas", jPanel2);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void botonSalirMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botonSalirMouseClicked
        System.exit(0);
    }//GEN-LAST:event_botonSalirMouseClicked

    private void botonRadialDuenioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_botonRadialDuenioItemStateChanged
        //JOptionPane.showMessageDialog(null, "state", "", JOptionPane.PLAIN_MESSAGE);        
        if (botonRadialDuenio.isSelected()) {
            botonCrear.setEnabled(false);
        }
        repaint();
    }//GEN-LAST:event_botonRadialDuenioItemStateChanged

    private void botonRadialDuenioStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_botonRadialDuenioStateChanged
        //JOptionPane.showMessageDialog(null, "state", "", JOptionPane.PLAIN_MESSAGE);
        if (botonRadialDuenio.isSelected()) {
            etiquetaEnfoque.setVisible(false);
            capaEnfoque.setVisible(false);
            etiquetaEspecialidad.setVisible(false);
            capaEspecialidad.setVisible(false);
            etiquetaSalario.setVisible(false);
            capaSalario.setVisible(false);
            etiquetaGraduadoEn.setVisible(false);
            capaGraduadoEn.setVisible(false);
            
            
            
        } else if (botonRadialVeterinario.isSelected()) {
            etiquetaEnfoque.setVisible(true);
            capaEnfoque.setVisible(true);
            etiquetaEspecialidad.setVisible(true);
            capaEspecialidad.setVisible(true);
            etiquetaSalario.setVisible(true);
            capaSalario.setVisible(true);
            etiquetaGraduadoEn.setVisible(true);
            capaGraduadoEn.setVisible(true);
        }
        repaint();
    }//GEN-LAST:event_botonRadialDuenioStateChanged

    private void campoTextoNumeroDocumentoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoTextoNumeroDocumentoKeyReleased
        if (campoTextoNumeroDocumento.getText().length() < 11
                && campoTextoNumeroDocumento.getText().length() > 6) {
            campoTextoDocumentoValido = true;
        } else {
            campoTextoDocumentoValido = false;

        }
        activarBoton();
    }//GEN-LAST:event_campoTextoNumeroDocumentoKeyReleased

    private void campoTextoNombreKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoTextoNombreKeyReleased
        if (campoTextoNombre.getText().length() < 40
                && campoTextoNombre.getText().length() > 0) {
            campoTextoNombreValido = true;
        } else {
            campoTextoNombreValido = false;
        }
        activarBoton();
        activarBotonModificar();
    }//GEN-LAST:event_campoTextoNombreKeyReleased

    private void campoTextoFechaNacimientoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoTextoFechaNacimientoKeyReleased
            if (campoTextoFechaNacimiento.getText().length() < 51
                    && campoTextoFechaNacimiento.getText().length() > 1) {
                campoTextoFechaNacimientoValido = true;
            } else {
                campoTextoFechaNacimientoValido = false;
            }
        
        activarBoton();
        activarBotonModificar();
    }//GEN-LAST:event_campoTextoFechaNacimientoKeyReleased

    private void campoTextoLugarNacimientoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoTextoLugarNacimientoKeyReleased
        if (campoTextoLugarNacimiento.getText().length() < 16
                && campoTextoLugarNacimiento.getText().length() > 6) {
            campoTextoLugarNacimientoValido = true;
        } else {
            campoTextoLugarNacimientoValido = false;
        }
        activarBoton();
        activarBotonModificar();
    }//GEN-LAST:event_campoTextoLugarNacimientoKeyReleased

    private void campoTextoEnfoqueKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoTextoEnfoqueKeyReleased
        if (botonRadialVeterinario.isSelected()) {
        if (campoTextoEnfoque.getText().length() < 41
                && campoTextoEnfoque.getText().length() > 0) {
            campoTextoEnfoqueValido = true;
        } else {
            campoTextoEnfoqueValido = false;
        }
        }
        activarBoton();
        activarBotonModificar();
    }//GEN-LAST:event_campoTextoEnfoqueKeyReleased

    private void campoTextoEspecialidadKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoTextoEspecialidadKeyReleased
        if (botonRadialVeterinario.isSelected()) {
        if (campoTextoEspecialidad.getText().length() < 41
                && campoTextoEspecialidad.getText().length() > 0) {
            campoTextoEspecialidadValido = true;
        } else {
            campoTextoEspecialidadValido = false;
        }
        }
        activarBoton();
        activarBotonModificar();
    }//GEN-LAST:event_campoTextoEspecialidadKeyReleased

    private void botonCrearMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botonCrearMouseClicked
        
    }//GEN-LAST:event_botonCrearMouseClicked

    private void botonModificarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botonModificarMouseClicked
        
    }//GEN-LAST:event_botonModificarMouseClicked

    private void botonBorrarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botonBorrarMouseClicked
       
    }//GEN-LAST:event_botonBorrarMouseClicked

    private void botonRadialVeterinarioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_botonRadialVeterinarioItemStateChanged
       
        repaint();
    }//GEN-LAST:event_botonRadialVeterinarioItemStateChanged

    private void comboBoxSSNItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_comboBoxSSNItemStateChanged
        String seleccionado;
        seleccionado = (String) comboBoxSSN.getSelectedItem();
        seleccionado = seleccionado.split(" ")[0];
        if (botonRadialVeterinario.isSelected()) {
            if (seleccionado.equals("")) {
                campoTextoNumeroDocumento.setText("");
                campoTextoNumeroDocumento.setEnabled(true);
                campoTextoNombre.setText("");
                campoTextoFechaNacimiento.setText("");
                campoTextoLugarNacimiento.setText("");
                botonCrear.setEnabled(false);
                botonBorrar.setEnabled(false);
                botonModificar.setEnabled(false);
            } 
        } else if (botonRadialDuenio.isSelected()) {
            if (seleccionado.equals("")) {
                campoTextoNumeroDocumento.setText("");
                campoTextoNumeroDocumento.setEnabled(true);
                campoTextoNombre.setText("");
                campoTextoFechaNacimiento.setText("");
                campoTextoLugarNacimiento.setText("");
                campoTextoEnfoque.setText("");
                campoTextoEspecialidad.setText("");
                capaSalario.setText("");
                capaGraduadoEn.setText("");
                botonCrear.setEnabled(false);
                botonBorrar.setEnabled(false);
                botonModificar.setEnabled(false);
            } 
        }
        activarBotonModificar();
    }//GEN-LAST:event_comboBoxSSNItemStateChanged

    private void botonRadialVeterinarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonRadialVeterinarioActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_botonRadialVeterinarioActionPerformed


    private void activarBoton() {
        if (botonRadialDuenio.isSelected() && (comboBoxSSN.getSelectedIndex() == 0)) {
            if (campoTextoDocumentoValido && campoTextoNombreValido 
                    && campoTextoLugarNacimientoValido && campoTextoFechaNacimientoValido) {
                botonCrear.setEnabled(true);
            } else {
                botonCrear.setEnabled(false);
            }
        } else if (botonRadialVeterinario.isSelected() && (comboBoxSSN.getSelectedIndex() == 0)) {
            if (campoTextoDocumentoValido && campoTextoNombreValido 
                    && campoTextoLugarNacimientoValido && campoTextoFechaNacimientoValido
                    && campoTextoEnfoqueValido && campoTextoEspecialidadValido) {
                botonCrear.setEnabled(true);
            } else {
                botonCrear.setEnabled(false);
            }
        }
    }

    private void activarBotonModificar() {
        if (botonRadialDuenio.isSelected() && (comboBoxSSN.getSelectedIndex() != 0)) {
            if (campoTextoDocumentoValido && campoTextoNombreValido 
                    && campoTextoLugarNacimientoValido && campoTextoFechaNacimientoValido) {
                botonModificar.setEnabled(true);
            } else {
                botonModificar.setEnabled(false);
            }
        } else if (botonRadialVeterinario.isSelected() && (comboBoxSSN.getSelectedIndex() != 0)) {
            if (campoTextoDocumentoValido && campoTextoNombreValido 
                    && campoTextoLugarNacimientoValido && campoTextoFechaNacimientoValido
                    && campoTextoEnfoqueValido && campoTextoEspecialidadValido) {
                botonModificar.setEnabled(true);
            } else {
                botonModificar.setEnabled(false);
            }
        }
    }

    /**
     * @param args the command line arguments
     */

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botonBorrar;
    private javax.swing.JButton botonCrear;
    private javax.swing.JButton botonModificar;
    private javax.swing.JRadioButton botonRadialDuenio;
    private javax.swing.JRadioButton botonRadialVeterinario;
    private javax.swing.JButton botonSalir;
    private javax.swing.JTextField campoTextoEnfoque;
    private javax.swing.JTextField campoTextoEspecialidad;
    private javax.swing.JTextField campoTextoFechaNacimiento;
    private javax.swing.JTextField campoTextoLugarNacimiento;
    private javax.swing.JTextField campoTextoNombre;
    private javax.swing.JTextField campoTextoNumeroDocumento;
    private javax.swing.JLayer capaDocumento;
    private javax.swing.JLayer capaEnfoque;
    private javax.swing.JLayer capaEspecialidad;
    private javax.swing.JLayer capaFechaNacimiento;
    private javax.swing.JTextField capaGraduadoEn;
    private javax.swing.JLayer capaLugarNacimiento;
    private javax.swing.JLayer capaNombre;
    private javax.swing.JTextField capaSalario;
    private javax.swing.JComboBox comboBoxSSN;
    private javax.swing.JLabel etiquetaEnfoque;
    private javax.swing.JLabel etiquetaEspecialidad;
    private javax.swing.JLabel etiquetaFechaNacimiento;
    private javax.swing.JLabel etiquetaGraduadoEn;
    private javax.swing.JLabel etiquetaLugarNacimiento;
    private javax.swing.JLabel etiquetaNombre;
    private javax.swing.JLabel etiquetaNumeroDocumento;
    private javax.swing.JLabel etiquetaSalario;
    private javax.swing.JLabel etiquetaTipo;
    private javax.swing.ButtonGroup grupoBotonesCargo;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JLabel labelSSN;
    private javax.swing.JPanel panelDatos;
    private javax.swing.JPanel panelOperaciones;
    private javax.swing.JPanel panelSeleccionarPersonas;
    // End of variables declaration//GEN-END:variables
    private boolean campoTextoDocumentoValido = false;
    private boolean campoTextoNombreValido = false;
    private boolean campoTextoLugarNacimientoValido = false;
    private boolean campoTextoFechaNacimientoValido = false;
    private boolean campoTextoEnfoqueValido = false;
    private boolean campoTextoEspecialidadValido = false;
}
